package com.zzyl.nursing.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @Program zzyl
 * @Description
 * @Author lzy
 * @Create 2025-01-10 15:08
 **/
@ApiModel(description = "老人家属绑定DTO")
@Data
public class FamilyMemberElderDto {

    /**
     * 老人姓名
     */
    @NotBlank(message = "老人姓名不能为空")
    @ApiModelProperty(value = "老人姓名")
    private String name;


    /**
     * 身份证号
     */
    @NotBlank(message = "身份证号不能为空")
    @Pattern(regexp = "^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$",message = "身份证号格式不正确")
    @ApiModelProperty(value = "身份证号")
    private String idCard;

    /**
     * 称呼
     */
    @ApiModelProperty(value = "称呼")
    @NotBlank(message = "称呼不能为空")
    @Max(value = 10,message = "称呼长度不能超过10")
    private String remark;

    /** 当前记录起始索引 */
    private Integer pageNum;

    /** 每页显示记录数 */
    private Integer pageSize;
}
